package br.com.dp.dao.entidade;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the conhecimento database table.
 * 
 */
@Entity
@Table(name="conhecimento")
@NamedQuery(name="Conhecimento.findAll", query="SELECT c FROM Conhecimento c")
public class Conhecimento implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(unique=true, nullable=false)
	private int id;

	@Column(nullable=false, length=45)
	private String descricao;

	//bi-directional many-to-many association to Hotel
	@ManyToMany
	@JoinTable(
		name="asc_hotel_conhecimento"
		, joinColumns={
			@JoinColumn(name="idConhecimento", nullable=false)
			}
		, inverseJoinColumns={
			@JoinColumn(name="idHotel", nullable=false)
			}
		)
	private List<Hotel> hotels1;

	//bi-directional many-to-many association to Hotel
	@ManyToMany(mappedBy="conhecimentos2")
	private List<Hotel> hotels2;

	public Conhecimento() {
	}

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getDescricao() {
		return this.descricao;
	}

	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}

	public List<Hotel> getHotels1() {
		return this.hotels1;
	}

	public void setHotels1(List<Hotel> hotels1) {
		this.hotels1 = hotels1;
	}

	public List<Hotel> getHotels2() {
		return this.hotels2;
	}

	public void setHotels2(List<Hotel> hotels2) {
		this.hotels2 = hotels2;
	}

}